[t:/]$ 지식_

uselib, lib 로딩 순서

2011/10/06
uselib() was used by early libc startup code to load the shared libraries with names found in an array of names in the binary.
Since libc 4.3.2, startup code tries to prefix these names with "/usr/lib", "/lib" and "" before giving up. In libc 4.3.4 and later these names are looked for in the directories found in LD_LIBRARY_PATH, and if not found there, prefixes "/usr/lib", "/lib" and "/" are tried.

From libc 4.4.4 on only the library "/lib/ld.so" is loaded, so that this dynamic library can load the remaining libraries needed (again using this call). This is also the state of affairs in libc5.

glibc2 does not use this call.

http://linux.die.net/man/2/uselib

uselib는 libc 기동시 공유 라이브러리 로딩하는 함수. _GNU_SOURCE 선언해야 할 듯.

libc 4.3.2 에서는 /usr/lib, /lib

4.3.4 이상 부터는 LD_LIBRARY_PATH 부터 뒤짐. 없으면 /usr/lib /lib / 뒤짐





공유하기













[t:/] is not "technology - root". dawnsea, rss